package com.huilian.iotbox.data.enums;

import lombok.Getter;

/**
 * @author LinYinDong
 * @date 2023/10/13 11:15
 */
@Getter
public enum LotteryRecordSecondaryTypeEnum {
    EXCHANGE(1, "兑换商品"),
    CHARGEBACK(2, "兑换商品退单"),
    BILL_DEPOSIT(3, "存票"),
    SEND_WELFARE(4, "派发福利"),
    MERCHANT_ADJUSTMENT(5, "商家调整彩票余额");

    private Integer code;
    private String desc;

    LotteryRecordSecondaryTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String formatDesc(Integer code){
        LotteryRecordSecondaryTypeEnum[] values = LotteryRecordSecondaryTypeEnum.values();
        String desc = null;
        for (int i = 0; i < values.length; i++) {
            if (values[i].code.compareTo(code) == 0){
                desc = values[i].desc;
                break;
            }
        }
        return desc;
    }
}
